package ch.zbw.timeline.service;

import java.util.Calendar;
import java.util.List;

import ch.zbw.timeline.domain.Employee;
import ch.zbw.timeline.domain.Role;
import ch.zbw.timeline.domain.YearConfig;

/**
 * Interface that handle the employee. The employee are generated and saved to
 * the database The employee can be read from the database
 * 
 * @author Andreas Kaderli
 * @version 12.11.2011
 * 
 */
public interface EmployeeService {

	/**
	 * These method create a new employee and save it to the database
	 * 
	 * @param firstName
	 *            the firstName from new employee
	 * @param lastName
	 *            the lastName from new employee
	 * @param userName
	 *            the userName from new employee
	 * @param commencementDate
	 *            the commencementDate from new employee
	 * @param password
	 *            the password from new employee
	 * @param dateOfBirth
	 *            the dateOfBirth from employee
	 * @param role
	 *            the role from new employee
	 * @param active
	 *            the status from new employee
	 * @param employmentStatus
	 *            the employmentStatus from new employee
	 * @return the new created employee
	 */
	public Employee createEmployee(String firstName, String lastName, String userName, Calendar commencementDate,
			String password, Calendar dateOfBirth, Role role, boolean active, int employmentStatus);

	/**
	 * These method save the employee to the database
	 * 
	 * @param employee
	 *            the employee who is save to the database
	 * @return return the employee
	 */
	public Employee saveEmployee(Employee employee);

	/**
	 * These method returns all employees from the database
	 * 
	 * @return returns all employees
	 */
	public List<Employee> getAllEmployees();

	/**
	 * These method is competent to authenticate the employee at the login
	 * 
	 * @param userName
	 *            the userName from the employee
	 * @param password
	 *            the password from the employee
	 * @param role
	 *            the role from the employee
	 * @return return the employee
	 */
	public Employee authenticate(String userName, String password, Role role);

	/**
	 * These method get the count of the vacationDays by employee and year
	 * 
	 * @param employee
	 *            the employee whit the vacationDays
	 * @param yearConfig
	 *            the year from the vacationDays
	 * @return returns the count of vacationDays from employee and year
	 */
	public double getNumbersOfVacationDays(Employee employee, YearConfig yearConfig);

	/**
	 * These method get all roles they are in the database
	 * 
	 * @return returns a list from roles
	 */
	public List<Role> getAllRoles();

}
